#include "lct_spri_AssetConverter.h"

#include <jni.h>
#include <stdio.h>

JNIEXPORT void JNICALL Java_lct_spri_AssetConverter_createAssetProcessor(JNIEnv *env, jobject thisObj)
{
	// Get a reference to this object's class
	jclass thisClass = env->GetObjectClass(thisObj);

	// int
	// Get the Field ID of the instance variables "number"
	jfieldID assetProcessorAddrFid = env->GetFieldID(thisClass, "m_assetProcessorAddr", "I");

	// Get the int given the Field ID
	jint assetProcessorAddr = env->GetIntField(thisObj, assetProcessorAddrFid);
	//printf("In C, the int is %d\n", number);

	// Change the variable
	//number = 99;
	env->SetIntField(thisObj, assetProcessorAddrFid, 4);

	printf("Hello World!\n");
	fflush(NULL);
	return;
}

JNIEXPORT void JNICALL Java_lct_spri_AssetConverter_destroyAssetProcessor(JNIEnv *env, jobject thisObj)
{
   printf("Hello World!\n");
   fflush(NULL);
   return;
}
